package controllers

import (
	"ben-xi-expressage/models"
	"github.com/astaxie/beego"
)

// ObjectController Operations about object
type ObjectController struct {
	beego.Controller
}

// Post @Title Create
// @Description create object
// @Param	body		body 	models.Object	true		"The object content"
// @Success 200 {string} models.Object.Id
// @Failure 403 body is empty
// @router /server/routes [post]
func (o *ObjectController) Post() {
	p := o.GetString("Parameters")

	benXiRoutes := models.RoutesPost(p)
	o.Data["json"] = benXiRoutes
	o.ServeJSON()
}
